<include file="Public/header"/>
<div class="row">
    <div class="col-md-12">
        <div class="ibox float-e-margins">
            <!--条件查询-->
            <div class="ibox-title">
                <h5>提款管理</h5>
                <div class="ibox-tools">
                    <i class="layui-icon" onclick="location.replace(location.href);" title="刷新"
                       style="cursor:pointer;">ဂ</i>
                </div>
            </div>
            <!--条件查询-->
            <div class="ibox-content">
                <form class="layui-form" action="" method="get" autocomplete="off" id="withdrawalform">
                    <input type="hidden" name="m" value="User">
                    <input type="hidden" name="c" value="Withdrawal">
                    <input type="hidden" name="a" value="index">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" name="createtime" id="createtime"
                                       placeholder="申请起始时间" value="<{$_GET['createtime']}>">
                            </div>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" name="successtime" id="successtime"
                                       placeholder="打款起始时间" value="<{$_GET['successtime']}>">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <select name="status">
                                    <option value="">全部状态</option>
                                    <option <if condition="$_GET['status'] neq '' && $_GET['status'] eq 0">selected
                                </if> value="0">未处理</option>
                                    <option <if condition="$_GET['status'] eq 1">selected</if> value="1">处理中</option>
                                    <option <if condition="$_GET['status'] eq 2">selected</if> value="2">已打款</option>
                                    <option <if condition="$_GET['status'] eq 3">selected</if> value="3">已驳回</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="T">
                                    <option value="">全部类型</option>
                                    <option <if condition="$_GET[T] eq 1">selected</if> value="0">T + 0</option>
                                    <option <if condition="$_GET[T] eq 1">selected</if> value="1">T + 1</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline">
                            <button type="submit" class="layui-btn"><span
                                    class="glyphicon glyphicon-search"></span> 搜索
                            </button>
                            <a href="javascript:;" id="export" class="layui-btn layui-btn-danger"><span class="glyphicon glyphicon-export"></span> 导出数据</a>
                        </div>
                    </div>
                </form>

                <!--交易列表-->
                <table class="layui-table" lay-data="{width:'100%',id:'userData'}">
                    <thead>
                    <tr>
                        <th lay-data="{field:'key',width:60}"></th>
                        <th lay-data="{field:'t', width:60}">类型</th>
                        <th lay-data="{field:'userid', width:100,style:'color:#060;'}">商户编号</th>
                        <th lay-data="{field:'tkmoney', width:110}">结算金额</th>
                        <th lay-data="{field:'sxfmoney', width:100,style:'color:#060;'}">手续费</th>
                        <th lay-data="{field:'money', width:110}">到账金额</th>
                        <th lay-data="{field:'bankname', width:120,style:'color:#C00;'}">银行名称</th>
                        <th lay-data="{field:'bankzhiname', width:160}">支行名称</th>
                        <th lay-data="{field:'banknumber', width:198}">银行卡号/开户名</th>
                        <th lay-data="{field:'sheng', width:100}">所属省</th>
                        <th lay-data="{field:'shi', width:120}">所属市</th>
                        <th lay-data="{field:'sqdatetime', width:170}">申请时间</th>
                        <th lay-data="{field:'cldatetime', width:170}">处理时间</th>
                        <th lay-data="{field:'status', width:100}">状态</th>
                        <th lay-data="{field:'memo', width:180}">状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="list" id="vo">
                        <tr>
                            <td><{$vo.id}></td>
                            <td>T+<{$vo.t}></td>
                            <td><{$vo["userid"]+10000}></td>
                            <td><{$vo["tkmoney"]}> 元</td>
                            <td><{$vo["sxfmoney"]}> 元</td>
                            <td><{$vo["money"]}> 元</td>
                            <td><{$vo.bankname}></td>
                            <td><{$vo.bankzhiname}></td>
                            <td><{$vo.banknumber}> | <{$vo.bankfullname}></td>
                            <td><{$vo.sheng}></td>
                            <td><{$vo.shi}></td>
                            <td><{$vo.sqdatetime}></td>
                            <td><{$vo.cldatetime}></td>
                            <td>
                                <switch name="vo.status">
                                    <case value="0"><span style="color:#F00;">未处理</span></case>
                                    <case value="1"><span style="color:#06F;">处理中</span></case>
                                    <case value="2"><span style="color:#060;">已打款</span></case>
                                    <case value="3"><span class="text-danger">已驳回</span></case>
                                    <default />
                                </switch>
                            </td>
                            <td><{$vo.memo}></td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <!--交易列表-->
                <div class="pagex"> <{$page}></div>
            </div>
        </div>
    </div>
</div>
<include file="Public/footer"/>
<script>
    layui.use(['laydate', 'laypage', 'layer', 'table', 'form'], function() {
        var laydate = layui.laydate //日期
            , laypage = layui.laypage //分页
            ,layer = layui.layer //弹层
            ,form = layui.form //表单
            , table = layui.table; //表格
        //日期时间范围
        laydate.render({
            elem: '#createtime'
            , type: 'datetime'
            ,theme: 'molv'
            , range: '|'
        });
        //日期时间范围
        laydate.render({
            elem: '#successtime'
            , type: 'datetime'
            ,theme: 'molv'
            , range: '|'
        });
    });
    $('#export').on('click',function(){
        window.location.href
            ="<{:U('User/Withdrawal/exportorder',array('T'=>$_GET[T],'createtime'=>$_GET[createtime],'successtime'=>$_GET[successtime],'tongdao'=>$_GET[tongdao],'status'=>$_GET[status]))}>";
    });
</script>
</body>
</html>